package com.ly.service;

import com.github.pagehelper.PageInfo;
import com.ly.po.CoursesPO;
import com.ly.po.ExamCoursePO;
import com.ly.po.ExamPO;
import com.ly.pojo.Courses;
import com.ly.pojo.Exam;
import com.ly.query.ExamQuery;
import org.springframework.data.domain.Page;

import java.util.List;

public interface ExamService {
    ExamPO getExamPOByCourseId(int courseId);


    int insertExam(Exam exam);

    int updateExam(ExamPO examPO);

    PageInfo<ExamPO> getAllExam(int page, int size);

    int deleteExamByCourseId(int courseId);

    int containtCourse(int courseId, Long tno);

    PageInfo<ExamPO> getAllExamByStudent(Long sno, int page, int size);

    Exam getExamByCourseCode(String courseCode);

    int deleteExamByCourseCode(String courseCode);

    void deleteExamByCourseCodeList(List<String> courseCodeList);

    Page<ExamCoursePO> getAllExams(ExamQuery query);

    PageInfo<ExamPO> getAllExamByCourseList(int page, int size, List<Courses> coursesList);
}
